/*            Copyright(c) 2006-2008 Dave Sexton           *
 * http://www.codeplex.com/DocProject                      *
 * http://www.codeplex.com/DocProject/Project/License.aspx *
 ***********************************************************/
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Configuration.Provider;
using System.Collections.Generic;

namespace DaveSexton.DocProject.DocSites
{
	public abstract class DocSiteSearchProvider : ProviderBase
	{
		#region Public Properties
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
		public abstract IEnumerable<IndexEntry> this[params string[] keywords] { get; }

		public abstract int KeywordCount { get; }

		public abstract int DocumentCount { get; }

		public abstract IEnumerable<KeywordEntry> Keywords { get; }

		public abstract IEnumerable<QueryOperator> UnaryQueryOperators { get; }

		public abstract string SplitQueryCharacters { get; }

		public abstract QueryOperator DefaultOperator { get; }

		public abstract bool OptimizeQueries { get; }
		#endregion

		#region Private / Protected
		#endregion

		#region Constructors
		/// <summary>
		/// Constructs a new instance of the <see cref="DocSiteSearchProvider" /> class for derived classes.
		/// </summary>
		protected DocSiteSearchProvider()
		{
		}
		#endregion

		#region Methods
		public abstract void ClearIndex();

		public abstract void AddKeyword(string word, IndexEntry entry);

		public abstract bool HasKeyword(string word);

		public abstract QueryOperator GetQueryOperator(string term);

		public abstract IEnumerable<IndexMatch> Search(QueryExpression query);
		#endregion
	}
}
